<!DOCTYPE html><html><head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
	<title>退货</title>
    <link href="<?php echo TEMPLATE_SITE_URL;?>/css/sendout.css" rel="stylesheet" type="text/css">
    <link href="<?php echo TEMPLATE_SITE_URL;?>/css/common.css" rel="stylesheet" type="text/css">
    <link href="<?php echo TEMPLATE_SITE_URL;?>/css/payment.css" rel="stylesheet" type="text/css">
	<style>
        .reasonMain {
            width: 100%;
            background-color: #FFF;
            border-top: 1px solid #eaeae8;
            margin-top: 20px;
        }

        .reasonMain .reason {
            width: 92%;
            margin: 0 4%;
            border-bottom: none;
            line-height: 43px;
            height: 43px;
            font-size: 14px;
        }

        .reasonMain .reason.checked {
            border-bottom: 1px solid #eaeae8;
        }

        .reasonMain .reason .reasonTitle {
            width: 92px;
            float: left;
        }

        .reasonMain .reason .reasonSelect {
            width: 60%;
            float: left;
            color: #7885AF;
        }

        .reasonMain .reason .downicon {
            float: right;
            background: url(/res/img/gray_down_arrow.png) no-repeat;
            -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
            width: 18px;
            height: 12px;
            display: block;
            margin-top: 16px;
        }

        .reasonMain .reason.checked .downicon {
            -webkit-transform: rotate(180deg);
            transform: rotate(180deg);
        }

        .reasonMain .reasonList {
            width: 92%;
            margin: 0 4%;
            font-size: 14px;
            height: 0px;
            padding: 10px 0px;
            overflow: hidden;
            display: none;
        }

        .reasonMain .reasonList .reasonItem {
            height: 40px;
            line-height: 40px;
        }

        .otherReason {
            width: 92%;
            margin: 0 4%;
            display: none;
        }

        .otherReason textarea {
            width: 95%;
            height: 60px;
            outline: none;
            border: 1px solid #DEDEDE;
            border-radius: 3px;
            font-size: 14px;
            background-color: #F9F9F9;
            color: #404040;
            padding: 2%;
            margin-bottom: 10px;
        }

        .tips {
            color: #787B7E;
            line-height: 30px;
            height: 30px;
            text-align: right;
            margin-right: 4%;
            display: none;
        }

        .refundPublish {
            width: 92%;
            margin: 20px 4%;
            height: 45px;
            line-height: 45px;
            background-color: #06BE04;
            border: none;
            border-radius: 3px;
            color: #FFF;
            font-size: 18px;
        }

        .reasonLogList {
            background-color: #FFF;
            border-top: 1px solid #eaeae8;
            width: 92%;
            margin: 0 4%;
        }

        .reasonLogList table {
            width: 100%;
        }

        .reasonLogList table thead tr td {
            font-weight: bold;
            font-size: 13px;
        }

        .reasonLogList table tbody tr:nth-child(2n+1) {
            background-color: #F5F5F5;
        }

        .reasonLogList table tr td {
            border-bottom: 1px solid #eaeae8;
            height: 30px;
            line-height: 30px;
        }

        .reasonLogList table tr td:first-child {
            text-indent: 4px;
            width: 105px;
            padding-left: 6px;
        }

        .reasonLogList table tr td:last-child {
            text-align: right;
            width: 75px;
            padding-right: 6px;
        }

        .reasonLogList table tr:last-child td {
            border-bottom: none;
        }
        
     .reasonMain .reasonList .reasonItem {
            height: 40px;
            line-height: 40px;
        }
        
        
		</style>
	
	<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/zepto.js" charset="utf-8"></script>
</head>
<body>
<div id="contentbox" style="min-height: 576px;">
    <div class="saleMain">
        <div class="title">拍品信息</div>
        <div class="goodInfo">
            <div class="img" style="background-image: url(<?php echo UPLOAD_SITE_URL.'/shop/auction/'.$output['auction']['auction_add_date'].'/'.$output['auction']['auction_img1'];?>);"></div>
            <div class="desc"><?php echo bearshop_auction_description_substr($output['auction']['auction_description']);?></div>
            <div style="font-size: 12px;color:#888;padding-top:4px;"><span>买家：</span><span><?php echo $output['order']['user_name'];?></span></div>           
            <div style="font-size: 12px;color:#888;padding-top:4px;"><span>成交金额：</span><span><?php echo $output['order']['price'];?>元</span></div>
            <div style="font-size: 12px;color:#888;padding-top:4px;"><span>截拍时间：</span><span><?php echo date("Y年m月d日 H:i",$output['auction']['end_time']);?></span></div>
        </div>
    </div>

        <div class="reasonMain">
            <div class="reason">
                <div class="reasonTitle">申请退款理由</div>
                <div class="reasonSelect"><?php echo $output['order']['reason'];?></div>
            </div>
        </div>
        
<?php if(!empty($output['address'])){?>
<div class="addressMain">
        <div class="userInfo">
            <span>收货人：<?php echo $output['address']['name'];?></span><span><?php echo $output['address']['tele'];?></span>
        </div>
        <div class="addressInfo">
        	<?php echo $output['address']['prov_name'];?>
            <?php echo $output['address']['city_name'];?>
           	<?php echo $output['address']['dis_name'];?>
        	<?php echo $output['address']['address'];?>
        </div>
        <a href="index.php?act=payment&op=addresslist&type=tui&auction_id=<?php echo intval($_GET['auction_id']);?>"><div class="edit"></div></a>
</div>
<?php }else{?>
<div class="addressMain">
		<a href="index.php?act=payment&op=addresslist&type=tui&auction_id=<?php echo intval($_GET['auction_id']);?>">
        <div class="userInfo">
            <span>添加收货地址</span>
            <span></span>
        </div>
        <div class="addressInfo">获取地址</div>
        <div class="edit"></div>
        </a>
</div>
<?php }?>        

    <div class="doMain">
    	<input type="hidden" name="order_id" value="<?php echo $output['order']['id']?>">
    	<input type="hidden" name="address_id" value="<?php echo $output['address']['id']?>">
        <button class="submitBtn">同意退货</button>
    </div>
</div>
<script>


$(function(){

	$('.submitBtn').click(function(){
		var order_id = $('input[name=order_id]').val();
		var address_id = $('input[name=address_id]').val();
		$.ajax({
			type:'post',
			url:'index.php?act=payment&op=accepttuikuan',
			data:{order_id:order_id,address_id:address_id},
			dataType:'json',
			success:function(data){
				if(data.state){
					location.href = 'index.php?act=order&op=ordersellerdetail&auction_id='+<?php echo $_GET['auction_id']?>;
				}
				return false;
			}
		});
	});
});
</script>
</body>
</html>